<?php 
class Subcategorymanager_Model_Subcategorymanager implements Subcategorymanager_Model_Mainable {
    
    private $page = array();
    private $action_handler;
    
    public function main(array $variables = null) {
        if(isset($variables['get']['page']) && (trim($variables['get']['page']) != '')){
            $this->action_handler = new Subcategorymanager_Model_Pagedecision;
            return $this->action_handler->main($variables);
        }
        else {
            $this->page['template'] = WEB_ROOT_FOLDER."subcategorymanager/views/subcategorylist.php";
            $this->action_handler = new Subcategorymanager_Data_Getallsubcategories;
            $this->page['content'] = $this->action_handler->main($variables);
            return $this->page;
        }
    }

}
